package com.homework2;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;

public class Test01 {
    public static void main(String[] args) {
        ArrayList<String> objects = new ArrayList<>();
        objects.add("a");
        objects.add("f");
        objects.add("b");
        objects.add("c");
        objects.add("a");
        objects.add("d");
        objects.add("c");
        System.out.print(objects+" ");
        HashSet<String> objects1 = new HashSet<>();
        objects1.addAll(objects);
        objects.clear();
        objects.addAll(objects1);
        System.out.println(objects1);
    }
}
